package com.douziit.meilianoa.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.douziit.meilianoa.base.request.PageRequest;
import com.douziit.meilianoa.base.response.ResponseData;
import com.douziit.meilianoa.base.response.ResponseUtil;
import com.douziit.meilianoa.entity.LogInfo;
import com.douziit.meilianoa.service.LogInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 日志信息控制类
 */
@RestController
@RequestMapping("logInfo")
public class LogInfoController {

    @Autowired
    private LogInfoService logInfoService;

    /**
     * 查询日志信息
     */
    @PostMapping("/queryLog")
    public ResponseData queryLog(@RequestBody PageRequest req){

        List<LogInfo> list = logInfoService.listLogInfo(req);
        return ResponseUtil.jsonSuccess(list);

    }

}
